<?php


namespace app\common\model\supplier;

use app\common\model\BaseModel;

/**
 * 供应商服务保障模型
 */
class InvoiceLog extends BaseModel
{
    protected $pk = 'id';
    protected $name = 'invoice_log';


    public static function createData($where)
    {
        $model = new static();
        $where['app_id'] = self::$app_id;
        $data = $model->save($where);
        return $data;
    }





    public static function listAll($where = [], $with = [], $sort = '')
    {
        $model = new static();
        $list = $model-> where($where) -> order('id desc') -> select();
        return $list;
    }

    public function getStatusAttr($value)
    {
        $array = ['开票中','已开票'];
        return ['text' => $array[$value]??'开票中', 'value' => $value];
    }


}
